<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
*/

/**
 * Description of Url
 *
 * @author cshepherd
 */
class Url {
    public function getUrl() {
        $url="http://".$_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME'];
        $url .= "?controller=".$_GET['controller'];
        $url .= "&action=".$_GET['action'];
        if($_GET['pagina']) {
            $url .= "&page=".$_GET['pagina'];
        }
        if($_GET['id']){
            $url .= "&id=".$_GET['id'];
        }
        return $url;
        //$_SESSION['ultima_pagina'] = $url;
    }

}
?>
